    /** 
    * PTurlmigration -  http://code.google.com/p/alui-toolbox/
    * Copyright (c) 2008-2009
    * by Fabien Sanglier
    *
    * This file is part of PTurlmigration.
    * 
    * PTurlmigration is free software: you can redistribute it and/or modify
    * it under the terms of the GNU General Public License as published by
    * the Free Software Foundation, either version 3 of the License, or
    * (at your option) any later version.
    * 
    * PTurlmigration is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    * GNU General Public License for more details.
    * 
    * You should have received a copy of the GNU General Public License
    * along with PTurlmigration.  If not, see <http://www.gnu.org/licenses/>.
    */
    
package com.ppc.ptmigration;

import java.net.MalformedURLException;
import java.net.URL;
import java.rmi.RemoteException;

import com.plumtree.remote.prc.IRemoteSession;
import com.plumtree.remote.prc.PortalException;
import com.plumtree.remote.prc.RemoteSessionFactory;
import com.plumtree.remote.prc.content.IContentFactory;
import com.plumtree.remote.prc.content.item.IContentItemManager;
import com.plumtree.remote.prc.content.property.IPropertyManager;

public class RemoteMigrateUtil {
	protected IRemoteSession portalSession = null;
	
	public RemoteMigrateUtil(String soapEndPoint, String username, String password)
	throws MalformedURLException, PortalException, RemoteException {
		this.portalSession = initSession(soapEndPoint, username, password);
	}
	
	private IRemoteSession initSession(String soapEndPoint, String username, String password) 
	throws MalformedURLException, PortalException, RemoteException {
		//initialize the soap end point
        URL url = new URL(soapEndPoint);
        return RemoteSessionFactory.getExplicitLoginContext(url, username, password);
	}
	
	public void migrateContentObjects() {
		IContentFactory ptContentFactory = portalSession.getContentFactory();
		
		IContentItemManager cItemMgr = ptContentFactory.getContentItemManager();
		IPropertyManager propMgr = ptContentFactory.getPropertyManager();
		
		
	}
}
